import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {CommodityComponent} from './commodity/commodity.component';
import {CommodityEditComponent} from './commodity/commodity-edit/commodity-edit.component';
import {CommodityCategoryComponent} from './commodity/commodity-category/commodity-category.component';
import {CommoditySpecificationComponent} from './commodity/commodity-specification/commodity-specification.component';
import { HairShellListComponent } from './hair-shell/hair-shell-list/hair-shell-list.component';
import { HairShellDetailsComponent } from './hair-shell/hair-shell-details/hair-shell-details.component';
import { CustomizedCouponListComponent } from './customized-coupon-manage/customized-coupon-list/customized-coupon-list.component';
import { CustomizedCouponEditComponent } from './customized-coupon-manage/customized-coupon-edit/customized-coupon-edit.component';
import { CustomizedCouponDetailsComponent } from './customized-coupon-manage/customized-coupon-details/customized-coupon-details.component';
import { CustomizedDescentListComponent } from './customized-coupon-manage/customized-descent-list/customized-descent-list.component';
import { CustomizedDescentEditComponent } from './customized-coupon-manage/customized-descent-edit/customized-descent-edit.component';
import { CustomizedDescentDetailsComponent } from './customized-coupon-manage/customized-descent-details/customized-descent-details.component';

const routes: Routes = [
  {path: '', redirectTo: 'commodity', pathMatch: 'full'},
  {path: 'commodity', component: CommodityComponent, data: {breadcrumb: '爱定制商品', keep: true}},
  {path: 'commodity-edit', component: CommodityEditComponent, data: {breadcrumb: '编辑商品'}},
  {path: 'commodity-add', component: CommodityEditComponent, data: {breadcrumb: '新增商品'}},
  {path: 'commodity-category', component: CommodityCategoryComponent, data: {breadcrumb: '商品分类'}},
  {path: 'commodity-specification', component: CommoditySpecificationComponent, data: {breadcrumb: '规格管理'}},
  {path: 'manage', loadChildren: () => import('./manage/manage.module').then((m) => m.ManageModule)},
  {path: 'hair-shell-list', component: HairShellListComponent, data: {breadcrumb: '发手机壳'}},
  {path: 'hair-shell-details', component: HairShellDetailsComponent, data: {breadcrumb: '详情'}},
  {path: 'customized-coupon-list', component: CustomizedCouponListComponent, data: {breadcrumb: '优惠券', keep: true}},
  {path: 'customized-coupon-edit', component: CustomizedCouponEditComponent, data: {breadcrumb: '优惠券信息'}},
  {path: 'customized-coupon-details', component: CustomizedCouponDetailsComponent, data: {breadcrumb: '优惠券详情'}},
  {path: 'customized-descent-list', component: CustomizedDescentListComponent, data: {breadcrumb: '直降促销', keep: true}},
  {path: 'customized-descent-edit', component: CustomizedDescentEditComponent, data: {breadcrumb: '直降促销信息'}},
  {path: 'customized-descent-details', component: CustomizedDescentDetailsComponent, data: {breadcrumb: '直降促销详情'}}
];

@NgModule({
  imports: [RouterModule.forChild(routes)]
})
export class CustomizationRoutingModule {
}
